package com.even.camerarecoder

import android.app.Application
import com.even.camerarecoder.aac.AudioRecorder
import com.evendai.loglibrary.Timber

class AudioRecordThread : Thread(AudioRecordThread::class.java.simpleName) {

    override fun run() {
        try {
            AudioRecorder.startRecord(App.sContext as Application)
        } catch (e: Exception) {
            Timber.fe(e,"录制声音时出现异常！")
        }
    }

    fun close() {
        try {
            AudioRecorder.stopRecord()
        } catch (e: Exception) {
            Timber.fe(e,"停止录音时出现异常")
        }
    }

}